# -*- coding: utf-8 -*-
# Python中默认的编码格式是 ASCII 格式，在没修改编码格式时无法正确打印汉字，所以在读取中文时会报错。


# 倒序输出
for i in range(2, -1, -1):
    print(i)

for i in range(1, 3):   # 输出1和2
    print(i)


list = [1,2,3]
for i in list:
    print("list",i)

# 99乘法表
for i in range(1, 10):
    for j in range(1, i+1):
        print('{}x{}={}\t'.format(j, i, i*j), end='')
    print()


# 倒叙输出，角标需要减1
def l(coins):
    for i in range(len(coins), 0, -1):
        print(1,coins[i-1])

l([1,3,5,7])


# 0:从0开始
# 5:到5结束
# 2:每次间隔是2
# for i in range(0,5,2):
#     print(1,i)

# def k(nums):
#     for i in range(len(nums)):
#         print(nums[:i] + nums[i + 1:])
#
# nums = [1,2,3,4]